package com.shuwen.gcdj.config;

import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.UUID;

@Slf4j
@Component
public class MyKeyGenerator extends DefaultIdentifierGenerator implements IdentifierGenerator {

    @Override
    public String nextUUID(Object entity) {
        return UUID.randomUUID().toString();
    }
}